package org.cubikalabs.todolist.control
{
	import com.adobe.cairngorm.control.FrontController;
	
	import org.cubikalabs.todolist.command.GetTodoListCommand;
	import org.cubikalabs.todolist.command.LoginCommand;
	import org.cubikalabs.todolist.command.LogoutCommand;
	import org.cubikalabs.todolist.command.SaveTodoCommand;
	import org.cubikalabs.todolist.event.SecurityEvent;
	import org.cubikalabs.todolist.event.TodoEvent;
	
	public class Controller extends FrontController
	{
		public function Controller()
		{
			addCommand( SecurityEvent.LOGIN, LoginCommand );
			addCommand( SecurityEvent.LOGOUT, LogoutCommand );
			
			addCommand( TodoEvent.GET_TODOLIST, GetTodoListCommand );
			addCommand( TodoEvent.SAVE_TODO, SaveTodoCommand );
			
		}

	}
}

